package com.yuebao.utils;

import com.yuebao.exception.CustomerException;
import com.yuebao.result.EntityResponse;

public class ResponseUtils {
    public static <T> T getResponseData(EntityResponse<T> entityResponse) throws CustomerException {
        if(!entityResponse.isResponseRight()){
            throw new CustomerException(entityResponse.getMessage());
        }
        return entityResponse.getData();
    }
}
